package com.wenheng.config;

/**
 * @Auther: 文恒
 * @Date: 2021/3/25 - 03 - 25 -10:38
 * @Description:com.wenheng.config
 * @version:1.0
 */
import com.alibaba.druid.pool.DruidDataSource;

import org.springframework.boot.context.properties.ConfigurationProperties;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

@Configuration
public class JdbcConfig {
    @ConfigurationProperties(prefix = "spring.datasource")
    @Bean
    public DataSource dataSource(){
        return new DruidDataSource();
    }

}
